<template>
	<!-- 子表信息模板 -->
	<view class="collapse">
		<view class="collapse_title">
			<view class="collapse_name" v-if="name">{{ name }}</view>
			<view class="collapse_name" v-else>
				<slot name="name"></slot>
			</view>
			<slot name="right"></slot>
		</view>
		<view class="line"></view>
		<view class="collapse_content">
			<slot></slot>
		</view>
	</view>
</template>
<script>
	export default {
		data() {
			return {
			}
		},
		props: {
			name: {
				type: String
			}
		},
		methods: {
		}
	}
</script>
<style lang="scss" scoped>
.collapse{
	width: 100%;
	background: #FFFFFF;
	box-shadow: 0px 2px 10px 0px rgba(0,0,0,0.1000);
	border-radius: 10px;
	margin-bottom: 20rpx;
	.collapse_title{
		padding: 20rpx;
		display: flex;
		justify-content: space-between;
		align-items: center;
		.collapse_name{
			font-size: 14px;
			// font-family: PingFangSC-Medium, PingFang SC;
			font-weight: 500;
			color: #171717;
			line-height: 20px;
		}
	}
	.collapse_content{
		padding: 0 32rpx 32rpx;
	}
}
.line{
	width: 100%;
	background: rgba(0,0,0,0.1);
	height: 2rpx;
}
</style>